package com.bjqh.edu.Bean;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

/**
 * Created by Administrator on 2017/9/30.
 */

public class History implements Parcelable {


    /**
     * total : 0
     * course : [{"total":null,"id":9,"time":1505886895000,"flag":1,"page":null,"name":"语文","img":"/sys/menu/1505886895336.png","rows":null},{"total":null,"id":10,"time":1505404800000,"flag":1,"page":null,"name":"数学","img":null,"rows":null},{"total":null,"id":11,"time":1505404800000,"flag":1,"page":null,"name":"英语","img":null,"rows":null},{"total":null,"id":12,"time":1505404800000,"flag":1,"page":null,"name":"物理","img":null,"rows":null},{"total":null,"id":13,"time":1505404800000,"flag":1,"page":null,"name":"生物","img":null,"rows":null},{"total":null,"id":14,"time":1505404800000,"flag":1,"page":null,"name":"政治","img":null,"rows":null},{"total":null,"id":15,"time":1505404800000,"flag":1,"page":null,"name":"历史","img":null,"rows":null},{"total":null,"id":16,"time":1505404800000,"flag":1,"page":null,"name":"化学","img":"/sys/menu/1505453579920.png","rows":null}]
     * grade : [{"uid":null,"total":null,"id":6,"time":1506050244000,"flag":0,"contentid":"9,10,11,12,14,13","page":null,"name":"2年级","img":"/sys/menu/1506050243551.png","cname":"语文,英语,生物,物理,数学,政治","rows":null},{"uid":null,"total":null,"id":7,"time":1505717119000,"flag":0,"contentid":"9,10,11,12,14,13","page":null,"name":"3年级","img":"/sys/menu/1505717119409.png","cname":"语文,英语,生物,物理,数学,政治","rows":null},{"uid":null,"total":null,"id":8,"time":1505717125000,"flag":0,"contentid":"9,10,11,12,14,13","page":null,"name":"4年级","img":"/sys/menu/1505717125494.png","cname":"语文,英语,生物,物理,数学,政治","rows":null},{"uid":null,"total":null,"id":9,"time":1505717138000,"flag":0,"contentid":"9,10,11,12,14,13","page":null,"name":"6年级","img":"/sys/menu/1505717137800.png","cname":"语文,英语,生物,物理,数学,政治","rows":null},{"uid":null,"total":null,"id":10,"time":1505717152000,"flag":0,"contentid":"9,10,11,12,14,13","page":null,"name":"8年级","img":"/sys/menu/1505717151605.png","cname":"语文,英语,生物,物理,数学,政治","rows":null},{"uid":null,"total":null,"id":11,"time":1505717104000,"flag":0,"contentid":"9,10,11,12,14,13","page":null,"name":"1年级","img":"/sys/menu/1505717104247.png","cname":"语文,英语,生物,物理,数学,政治","rows":null},{"uid":null,"total":null,"id":12,"time":1505717159000,"flag":0,"contentid":"9,10,11,12,14,13","page":null,"name":"9年级","img":"/sys/menu/1505717158687.png","cname":"语文,英语,生物,物理,数学,政治","rows":null},{"uid":null,"total":null,"id":16,"time":1505717132000,"flag":0,"contentid":"9,10,11,12,14,13","page":null,"name":"5年级","img":"/sys/menu/1505717131594.png","cname":"语文,英语,生物,物理,数学,政治","rows":null},{"uid":null,"total":null,"id":17,"time":1505717145000,"flag":0,"contentid":"9,10,11,12,14,13","page":null,"name":"7年级","img":"/sys/menu/1505717144742.png","cname":"语文,英语,生物,物理,数学,政治","rows":null}]
     * msg : success
     * status : 200
     */

    private int total;
    private String msg;
    private int status;
    private List<CourseBean> course;
    private List<GradeBean> grade;

    public int getTotal() {
        return total;
    }

    public void setTotal(int total) {
        this.total = total;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public List<CourseBean> getCourse() {
        return course;
    }

    public void setCourse(List<CourseBean> course) {
        this.course = course;
    }

    public List<GradeBean> getGrade() {
        return grade;
    }

    public void setGrade(List<GradeBean> grade) {
        this.grade = grade;
    }

    public static class CourseBean implements Parcelable {
        /**
         * total : null
         * id : 9
         * time : 1505886895000
         * flag : 1
         * page : null
         * name : 语文
         * img : /sys/menu/1505886895336.png
         * rows : null
         */

        private String total;
        private String id;
        private long time;
        private int flag;
        private String page;
        private String name;
        private String img;
        private String rows;

        public String getTotal() {
            return total;
        }

        public void setTotal(String total) {
            this.total = total;
        }

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public long getTime() {
            return time;
        }

        public void setTime(long time) {
            this.time = time;
        }

        public int getFlag() {
            return flag;
        }

        public void setFlag(int flag) {
            this.flag = flag;
        }

        public String getPage() {
            return page;
        }

        public void setPage(String page) {
            this.page = page;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getImg() {
            return img;
        }

        public void setImg(String img) {
            this.img = img;
        }

        public String getRows() {
            return rows;
        }

        public void setRows(String rows) {
            this.rows = rows;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(this.total);
            dest.writeString(this.id);
            dest.writeLong(this.time);
            dest.writeInt(this.flag);
            dest.writeString(this.page);
            dest.writeString(this.name);
            dest.writeString(this.img);
            dest.writeString(this.rows);
        }

        public CourseBean() {
        }

        protected CourseBean(Parcel in) {
            this.total = in.readString();
            this.id = in.readString();
            this.time = in.readLong();
            this.flag = in.readInt();
            this.page = in.readString();
            this.name = in.readString();
            this.img = in.readString();
            this.rows = in.readString();
        }

        public static final Parcelable.Creator<CourseBean> CREATOR = new Parcelable.Creator<CourseBean>() {
            @Override
            public CourseBean createFromParcel(Parcel source) {
                return new CourseBean(source);
            }

            @Override
            public CourseBean[] newArray(int size) {
                return new CourseBean[size];
            }
        };
    }

    public static class GradeBean implements Parcelable {
        /**
         * uid : null
         * total : null
         * id : 6
         * time : 1506050244000
         * flag : 0
         * contentid : 9,10,11,12,14,13
         * page : null
         * name : 2年级
         * img : /sys/menu/1506050243551.png
         * cname : 语文,英语,生物,物理,数学,政治
         * rows : null
         */

        private String uid;
        private String total;
        private String id;
        private long time;
        private int flag;
        private String contentid;
        private String page;
        private String name;
        private String img;
        private String cname;
        private String rows;

        public String getUid() {
            return uid;
        }

        public void setUid(String uid) {
            this.uid = uid;
        }

        public String getTotal() {
            return total;
        }

        public void setTotal(String total) {
            this.total = total;
        }

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public long getTime() {
            return time;
        }

        public void setTime(long time) {
            this.time = time;
        }

        public int getFlag() {
            return flag;
        }

        public void setFlag(int flag) {
            this.flag = flag;
        }

        public String getContentid() {
            return contentid;
        }

        public void setContentid(String contentid) {
            this.contentid = contentid;
        }

        public String getPage() {
            return page;
        }

        public void setPage(String page) {
            this.page = page;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getImg() {
            return img;
        }

        public void setImg(String img) {
            this.img = img;
        }

        public String getCname() {
            return cname;
        }

        public void setCname(String cname) {
            this.cname = cname;
        }

        public String getRows() {
            return rows;
        }

        public void setRows(String rows) {
            this.rows = rows;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(this.uid);
            dest.writeString(this.total);
            dest.writeString(this.id);
            dest.writeLong(this.time);
            dest.writeInt(this.flag);
            dest.writeString(this.contentid);
            dest.writeString(this.page);
            dest.writeString(this.name);
            dest.writeString(this.img);
            dest.writeString(this.cname);
            dest.writeString(this.rows);
        }

        public GradeBean() {
        }

        protected GradeBean(Parcel in) {
            this.uid = in.readString();
            this.total = in.readString();
            this.id = in.readString();
            this.time = in.readLong();
            this.flag = in.readInt();
            this.contentid = in.readString();
            this.page = in.readString();
            this.name = in.readString();
            this.img = in.readString();
            this.cname = in.readString();
            this.rows = in.readString();
        }

        public static final Parcelable.Creator<GradeBean> CREATOR = new Parcelable.Creator<GradeBean>() {
            @Override
            public GradeBean createFromParcel(Parcel source) {
                return new GradeBean(source);
            }

            @Override
            public GradeBean[] newArray(int size) {
                return new GradeBean[size];
            }
        };
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.total);
        dest.writeString(this.msg);
        dest.writeInt(this.status);
        dest.writeTypedList(this.course);
        dest.writeTypedList(this.grade);
    }

    public History() {
    }

    protected History(Parcel in) {
        this.total = in.readInt();
        this.msg = in.readString();
        this.status = in.readInt();
        this.course = in.createTypedArrayList(CourseBean.CREATOR);
        this.grade = in.createTypedArrayList(GradeBean.CREATOR);
    }

    public static final Parcelable.Creator<History> CREATOR = new Parcelable.Creator<History>() {
        @Override
        public History createFromParcel(Parcel source) {
            return new History(source);
        }

        @Override
        public History[] newArray(int size) {
            return new History[size];
        }
    };
}
